home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
AdobeExamples
/
NX_ImportAdv
/
SaveAsPanel.m
< prev
next >
Wrap
Text File
|
1992-12-19
|
3KB
|
121 lines
/*
* (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved.
*
* (b) If this Sample Code is distributed as part of the Display PostScript
* System Software Development Kit from Adobe Systems Incorporated,
* then this copy is designated as Development Software and its use is
* subject to the terms of the License Agreement attached to such Kit.
*
* (c) If this Sample Code is distributed independently, then the following
* terms apply:
*
* (d) This file may be freely copied and redistributed as long as:
* 1) Parts (a), (d), (e) and (f) continue to be included in the file,
* 2) If the file has been modified in any way, a notice of such
* modification is conspicuously indicated.
*
* (e) PostScript, Display PostScript, and Adobe are registered trademarks of
* Adobe Systems Incorporated.
*
* (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
* CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
* AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
* ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
* OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
* WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
* WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
* DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS.
*/
/*
* SaveAsPanel.m
*
* Necessary because of the difficulty of obtaining a copy
* of the SavePanel. This subclass of panel uses the SavePanel
* panel and switches the panel from Save to a Save As to Save Selection.
* The panel is switched back and forth as needed.
*
* Version: 2.0
* Author: Ken Fromm
* History:
* 03-07-91 Added this comment.
*/
#import "SaveAsPanel.h"
#import <appkit/ButtonCell.h>
#import <appkit/Matrix.h>
#import <appkit/TextField.h>
#import <appkit/View.h>
#import <appkit/nextstd.h>
#import <objc/hashtable.h>
#import <objc/List.h>
#import <objc/Object.h>
#import <strings.h>
@implementation SaveAsPanel
- setAccessoryView:anObject
{
if (anObject)
accessory = anObject;
[super setAccessoryView:anObject];
return self;
}
- setSave
{
id aview;
aview = [[self contentView] findViewWithTag: NX_SPTITLEFIELD];
[aview setStringValueNoCopy:"Save"];
[self setAccessoryView:NULL];
[self setRequiredFileType:"adb"];
return self;
}
- setSaveAs
{
id aview;
aview = [[self contentView] findViewWithTag: NX_SPTITLEFIELD];
[aview setStringValueNoCopy:"Save As"];
[self setAccessoryView:NULL];
[self setRequiredFileType:"adb"];
return self;
}
- setSaveTo
{
id aview;
aview = [[self contentView] findViewWithTag: NX_SPTITLEFIELD];
[aview setStringValueNoCopy:"Save To"];
[self setAccessoryView:accessory];
[self setRequiredFileType:"eps"];
return self;
}
- setFormat:(int) aFormat
{
[[accessoryView findViewWithTag: SP_BUTTONTAG] selectCellWithTag:aFormat];
return self;
}
- (int) format
{
return [[accessoryView findViewWithTag: SP_BUTTONTAG] selectedTag];
}
@end